<%@page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%
	String path = request.getContextPath();
%>
<head>
<title>在线评分-最低价中选法</title>
</head>
<body>
<script type="text/javascript">
var displayTabId = "evalscore";

$(document).ready(function() {
	var options = {
		beforeSubmit : showRequest, 
		success : showResponse
		};
		$('#form1').ajaxForm(options);
	});

//pre-submit callback 
function showRequest(formData, jqForm, options) {
	var res = true;
	$.ajax({
	     type: "GET",
	     url: '<%=path%>/expeval/evalsetvalidate',
	     data: 'pkevalset='+document.form1.pkevalset.value,
	     async: false,
	     success: function(msg){ 
	     	if (!(msg.indexOf("EXPEVAL_SUCCESS") != -1)){
	     		res = false;
	     		var url = "iframe:<%=path%>/expeval/showmessage?messagecode=" + msg;
	     		msgDialog("提示信息", url,"400", "120", "","");
	     	}else{
		     	res = true;
	     	}		     	
	     }   
	});	
	return res;
}

// post-submit callback 
function showResponse(responseText, statusText, xhr, $form) {
	var url;
	if (responseText.indexOf("EXPEVAL_LOW_SUCCESS") != -1){
		url = "iframe:<%=path%>/expeval/showmessage?messagecode=EXPEVAL_OTHER_SUCCESS";		
	}else {
		url = "iframe:<%=path%>/expeval/showmessage?messagecode=responseText";
	}
	msgDialog("提示信息", url,"400", "120", "","");
}

function showTab(tabId){
	
	$("#"+displayTabId).removeClass("pflist_tab_a fontB");
	$("#"+displayTabId).addClass("pflist_tab_b");
	$("#"+tabId).removeClass("pflist_tab_b");
	$("#"+tabId).addClass("pflist_tab_a fontB");
	$("#tab_"+displayTabId).addClass("tab_down");
	$("#tab_"+tabId).removeClass("tab_down");
	displayTabId = tabId;
}
function showPriceDetail(pkevalset,pksupplier,mountdigit,pricedigit,anoymers){
	
	$.ajax({
	     type: "GET",
	     url: '<%=path%>/expeval/ischeckprice',
	     data: 'pkevalset='+pkevalset,
	     success: function(msg){ 
	     	if (!(msg.indexOf("EXPEVAL_SUCCESS") != -1)){
	     		var url = "iframe:<%=path%>/expeval/showmessage?messagecode=" + msg;
	     		msgDialog("提示信息", url,"400", "120", "","");
	     	}else{
	     		var url = "iframe:<%=path%>/expeval/suppricedetail?pkevalset="+pkevalset+"&pksupplier="+pksupplier+"&mountdigit="+mountdigit+"&pricedigit="+pricedigit+"&anoymers="+anoymers;
	     		dialog("供应商报价", url,"1100", "600", "","");
	     	}		     	
	     }   
	});
}
function lowEvalSubmit(pkevalset){
	$.ajax({
	     type: "GET",
	     url: '<%=path%>/expeval/evalsetvalidate',
	     data: 'pkevalset='+pkevalset,
	     success: function(msg){ 
	     	if (!(msg.indexOf("EXPEVAL_SUCCESS") != -1)){
	     		var url = "iframe:<%=path%>/expeval/showmessage?messagecode=" + msg;
	     		msgDialog("提示信息", url,"400", "120", "","");
	     	}else{
		     	document.form1.submit();
	     	}		     	
	     }   
	});
}
function lowEvalReset(){
	document.form1.reset();
}
function returnBack(){
	location.href="<%=path%>/expeval/expevallist";
}

function fileDownload(pkFile,fileName){
	document.download_form.pk_file.value=pkFile;
	document.download_form.file_name.value=fileName;
	document.download_form.submit();

}

function exportEvalInfo(){

	document.export_form.action="<%=path%>/expeval/lowevalexport";
	document.export_form.submit();
}
</script>
<!-- 当前位置 -->
<div class="path mt10">
	<div class="pleft"></div>
	<div class="pmi">当前位置：<a href="<%=path%>/expeval/expevallist">首页</a> >> 最低价中选法</div>
	<div class="pright"></div>
	<div class="clear"></div>
</div>
<!-- cont -->
<div class="pf mt10">最低价中选法在线评价</div>

<c:if test="${EXPERTEVAL_EVALLOWDETAIL != null}">
<table width="100%" border="0" cellspacing="4" cellpadding="0" class="pft mt10">
  <tr>
    <td width="100" align="right">采购方案编号：</td>
    <td width="143" align="left">${EXPERTEVAL_EVALLOWDETAIL.billno}</td>
    <td width="108" align="right">采购方案名称：</td>
    <td width="143" align="left">${EXPERTEVAL_EVALLOWDETAIL.project_name}</td>
    <td width="111" align="right">评分标准：</td>
   <td width="133" align="left">${EXPERTEVAL_EVALLOWDETAIL.eval_name}</td>
    <td width="81" align="right">评分方法：</td>
   <td width="146" align="left">${EXPERTEVAL_EVALLOWDETAIL.eval_methodShow}</td>
  </tr>
  <tr>
    <td align="right">投票可选数：</td>
    <td align="left">${EXPERTEVAL_EVALLOWDETAIL.vote_num}</td>
    <td align="right">评标室编号：</td>
    <td align="left">${EXPERTEVAL_EVALLOWDETAIL.eval_house_no}</td>
    <td align="right">评标室名称：</td>
   <td align="left">${EXPERTEVAL_EVALLOWDETAIL.eval_house_name}</td>
    <td align="right">评分轮次：</td>
   <td align="left">${EXPERTEVAL_EVALLOWDETAIL.eval_num}</td>
  </tr>
  <tr>
    <td align="right">评分开始时间：</td>
    <td align="left">${EXPERTEVAL_EVALLOWDETAIL.eval_begin_time}</td>
    <td align="right">评分截止时间：</td>
    <td align="left">${EXPERTEVAL_EVALLOWDETAIL.eval_end_time}</td>
    <td align="right">签到时间：</td>
   	<td align="left">${EXPERTEVAL_EVALLOWDETAIL.sign_time}</td>
    <td align="right">评分状态：</td>
    <td align="left">${EXPERTEVAL_EVALLOWDETAIL.signStatusShow}</td>
  </tr>
  <tr>
    <td align="right">评分人：</td>
    <td align="left">${EXPERTEVAL_EVALLOWDETAIL.expert_name}</td>
    <td align="right">提交时间：</td>
    <td align="left">${EXPERTEVAL_EVALLOWDETAIL.commit_time}</td>
    <td align="right">&nbsp;</td>
   	<td align="left">&nbsp;</td>
    <td align="right">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="right">评分方法描述：</td>
    <td colspan="5" align="left">${EXPERTEVAL_EVALLOWDETAIL.eval_desc}</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="right">备注：</td>
    <td colspan="5" align="left">${EXPERTEVAL_EVALLOWDETAIL.eval_memo}</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center"></td>
    <td colspan="7" align="left" class="redcolor">
    	<table align="left">
			<tr>
				<td>距离评价结束时间还有</td>	
				<td id="day"></td>
				<td>天</td>
				<td id="hour"></td>
				<td>小时</td>
				<td id="minute"></td>
				<td>分</td>
				<td id="second"></td>
				<td>秒</td>
				<td>,超过截止时间,评价结果将无效,请尽快提交评价结果</td>
			</tr>
		</table>
    </td>
    </tr>
</table>

<div class="pflist">
	<ul>
		<li class="pflist_bline tabwa"></li>
		<li id="evalscore" class="pflist_tab_a fontB" onclick="showTab('evalscore')">评分表</li>
		<li class="pflist_bline tabwb"></li>
		<li id="evalfile" class="pflist_tab_b" onclick="showTab('evalfile')">评分文件</li>
		<li class="pflist_bline tabwb"></li>
		<li id="suppfile" class="pflist_tab_b" onclick="showTab('suppfile')">供应商文件</li>
		<li class="pflist_bline tabwb"></li>
		<li id="supprice" class="pflist_tab_b" onclick="showTab('supprice')">供应商报价</li>
		<li class="pflist_bline tabwd"></li>
		<div class="clear"></div>
	</ul>
</div>
<form id="form1" name="form1" action="<%=path%>/expeval/lowevalsubmit" method="post">
<div id="tab_evalscore">
<input name="pkevalset" type="hidden" value="${EXPERTEVAL_EVALLOWDETAIL.pk_eval_set}"/>
<input name="pkexpert" type="hidden" value="${EXPERTEVAL_EVALLOWDETAIL.pk_expert}"/>
<input name="pkevalexpert" type="hidden" value="${EXPERTEVAL_EVALLOWDETAIL.pk_eval_expert}"/>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableline mt10" >
  <tr >
    <th width="40">序号</th>
   <th width="120">供应商编码</th>
    <th width="410">供应商名称</th>
    <th width="100">总报价</th>
    <th width="300">评价</th>
    </tr>
  	<c:if test="${EXPERTEVAL_EVALLOWDETAIL.lowEvalScoreFormList != null}"> 
   	<c:forEach items="${EXPERTEVAL_EVALLOWDETAIL.lowEvalScoreFormList}" var="lowScore">
  	<tr onmouseover="this.className='tablelinebg';" onmouseout="this.className='tablelinebgb';">
    <input name="pksupplier" type="hidden" value="${lowScore.pkSupplier}"/>
    <input name="${lowScore.pkSupplier}_evalscorepk" type="hidden" value="${lowScore.pkEvalScore}"/>
    <td>${lowScore.rowNo}</td>
    <td class="textalign">${lowScore.suppCode}</td>
    <td class="textalign">${lowScore.suppName}</td>
    <td class="numalign">${lowScore.totalSum}</td>
    <td class="textalign"><input class="textalign" name="${lowScore.pkSupplier}" type="text" value="${lowScore.suppEvalDesc}" class="evalinput"/></td>
    </tr>
    </c:forEach>
    </c:if>
</table>
</div>

<div id="tab_evalfile" class="tab_down">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableline mt10" >
  <tr >
    <th width="40">序号</th>
   <th width="320">文件名称</th>
    <th width="460">说明</th>
    <th width="150">上传时间</th>
    </tr>
   <c:if test="${EXPERTEVAL_EVALLOWDETAIL.evalFileFormList != null}"> 
   <c:forEach items="${EXPERTEVAL_EVALLOWDETAIL.evalFileFormList}" var="evalFile">
   <tr onmouseover="this.className='tablelinebg';" onmouseout="this.className='tablelinebgb';">
   <td>${evalFile.rowNo}</td>
    <td class="textalign"><a href="javascript:void(null)" onclick="fileDownload('${evalFile.pkFile}','${evalFile.evalFileName}')">${evalFile.evalFileName}</a></td>
    <td class="textalign">${evalFile.evalFileDesc}</td>
    <td>${evalFile.uploadDateTime}</td>
    </tr>
    </c:forEach>
    </c:if>
</table>
</div>

<div id="tab_suppfile" class="tab_down">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableline mt10" >
  <tr >
    <th width="40">序号</th>
   <th width="120">供应商编码</th>
    <th width="460">供应商名称</th>
    <th width="350">文件名称</th>
    </tr>
    <c:if test="${EXPERTEVAL_EVALLOWDETAIL.suppFileFormList != null}"> 
   <c:forEach items="${EXPERTEVAL_EVALLOWDETAIL.suppFileFormList}" var="suppFile">
  <tr onmouseover="this.className='tablelinebg';" onmouseout="this.className='tablelinebgb';">
    <td>${suppFile.rowNo}</td>
    <td class="textalign">${suppFile.suppCode}</td>
    <td class="textalign">${suppFile.suppName}</td>
    <td class="textalign"><a href="javascript:void(null)" onclick="fileDownload('${suppFile.pkFile}','${suppFile.suppFileName}')">${suppFile.suppFileName}</a></td>
    </tr>
    </c:forEach>
    </c:if>
</table>
</div>

<div id="tab_supprice" class="tab_down">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableline mt10" >
  <tr >
    <th width="40">序号</th>
   <th width="120">供应商编码</th>
    <th width="510">供应商名称</th>
    <th width="100">查看报价</th>
    </tr>
    <c:if test="${EXPERTEVAL_EVALLOWDETAIL.suppPriceFormList != null}"> 
   <c:forEach items="${EXPERTEVAL_EVALLOWDETAIL.suppPriceFormList}" var="suppPrice">
  <tr onmouseover="this.className='tablelinebg';" onmouseout="this.className='tablelinebgb';">
    <td>${suppPrice.rowNo}</td>
    <td class="textalign">${suppPrice.suppCode}</td>
    <td class="textalign">${suppPrice.suppName}</td>
    <td class="numalign"><a href="javascript:void(null)" onclick="showPriceDetail('${EXPERTEVAL_EVALLOWDETAIL.pk_eval_set}','${suppPrice.pkSupplier}','${EXPERTEVAL_EVALLOWDETAIL.mountDigit}','${EXPERTEVAL_EVALLOWDETAIL.priceDigit}','${EXPERTEVAL_EVALLOWDETAIL.anonymers}')">${suppPrice.totalPrice}</a></td>
    </tr>
    </c:forEach>
    </c:if>
</table>
</div>

</c:if>
<center class="mt10">
<input type="button" class="buttonok" value="导出" onclick="exportEvalInfo()"/>
<input type="button" class="buttonok" value="返回" onclick="returnBack()"/>
<input type="reset" class="buttonok" value="取消" />
<input type="submit" class="buttonok" value="提交" />
<div class="clear"></div></center>
</form>
<form name="export_form" id="export_form" action="" method="post" >
<input name="pkevalset" type="hidden" value="${EXPERTEVAL_EVALLOWDETAIL.pk_eval_set}"/>
<input name="pkproject" type="hidden" value="${EXPERTEVAL_EVALLOWDETAIL.pk_pur_project}"/>
</form>

<form name="download_form" id="download_form" action="<%=path%>/expeval/evaldownload" method="post" >
<input name="pk_file" type="hidden" value=""/>
<input name="file_name" type="hidden" value=""/>
</form>

<script type="text/javascript">
//设置时间控制对象
var change  = new timechange();
//设置时间长度
change.setDistance(${EXPERTEVAL_EVALLOWDETAIL.disMill});
//唤醒计算时间的方法
wakeInterval();
</script>

</body>
</html>
